package com.gzbugu.bugusys.vo.abs;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.gzbugu.bugusys.vo.Staff;

/**
 * AbstractStaffCertificate entity provides the base persistence definition of
 * the StaffCertificate entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractStaffCertificate implements java.io.Serializable {

	// Fields

	private Integer id;
	private Staff staff;
	private String name;
	private Date issueDate;
	private Date notbefore;
	private Date notafter;

	// Constructors

	/** default constructor */
	public AbstractStaffCertificate() {
	}

	/** full constructor */
	public AbstractStaffCertificate(Staff staff, String name, Date issueDate,
			Date notbefore, Date notafter) {
		this.staff = staff;
		this.name = name;
		this.issueDate = issueDate;
		this.notbefore = notbefore;
		this.notafter = notafter;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "staff_id")
	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	@Column(name = "name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "issue_date", length = 10)
	public Date getIssueDate() {
		return this.issueDate;
	}

	public void setIssueDate(Date issueDate) {
		this.issueDate = issueDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "notbefore", length = 10)
	public Date getNotbefore() {
		return this.notbefore;
	}

	public void setNotbefore(Date notbefore) {
		this.notbefore = notbefore;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "notafter", length = 10)
	public Date getNotafter() {
		return this.notafter;
	}

	public void setNotafter(Date notafter) {
		this.notafter = notafter;
	}

}